In massive stars, magnetic fields are thought to confine the outflowing radiatively-driven wind, resulting in X-ray emission that is harder, more variable and more efficient than that produced by instability-generated shocks in non-magnetic winds. Although magnetic confinement of stellar winds has been shown to strongly modify the mass-loss and X-ray characteristics of massive OB stars, we lack a detailed understanding of the complex processes responsible. The aim of this study is to examine the relationship between magnetism, stellar winds and X-ray emission of OB stars. In conjunction with a Chandra survey of the Orion Nebula Cluster, we carried out spectropolarimatric ESPaDOnS observations to determine the magnetic properties of massive OB stars of this cluster. We found of two new massive magnetic stars in the Orion Nebula Cluster: HD 36982 and HD 37061, for which the estimated dipole polar strengths are 1150 (+320 -200) G and 620 (+220 -170) G, respectively. However, the apparent lack of clear correlation between X-ray indicator and the presence of a magnetic fields brings forth new challenges for understanding the processes leading to X-ray emission in massive stars.